<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>商户信息</title>
    <link rel="stylesheet" type="text/css" href="__LAYUI__/css/layui.css" />
</head>

<body>
<div class="layui-tab page-content-wrap">
    <ul class="layui-tab-title">
        <li class="layui-this">商户信息</li>
    </ul>
    <div class="layui-tab-content">
        <!--商户基本-->
        <div class="layui-tab-item layui-show">
            <form class="layui-form" style="width: 90%;padding-top: 20px;">
                <input name="uid" disabled hidden="hidden" value="{$user.uid|default='0'}">
                <input name="scene" disabled hidden="hidden" value="user">
                <div class="layui-form-item">
                    <label class="layui-form-label">账户名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="username" autocomplete="off" class="layui-input" value="{$user.username|default=''}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">登录邮箱：</label>
                    <div class="layui-input-block">
                        <input type="text" disabled name="account" autocomplete="off" class="layui-input" value="{$user.account|default=''}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">登录密码：</label>
                    <div class="layui-input-block">
                        <input type="password" name="password" placeholder="为空默认不修改" autocomplete="off" class="layui-input" value="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">手机号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="phone" autocomplete="off" class="layui-input" value="{$user.phone|default=''}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">QQ：</label>
                    <div class="layui-input-block">
                        <input type="text" name="qq" autocomplete="off" class="layui-input" value="{$user.qq|default=''}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="user">立即提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="__LAYUI__/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="__LAYUI__/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['form','jquery','layer','element'], function(index) {
        var form = layui.form(),
            layer = layui.layer,
            $ = layui.jquery,
            element = layui.element();

        form.render();
        //监听用户信息提交
        form.on('submit(user)', function(data) {
            $.post("{:url('index/User/edit')}",data.field,function (res) {
                    layer.msg(res.msg, {icon: res.code == 1 ? 1: 2,time: 1500},function () {
                        refresh(index);
                    });
                }
            );
            return false;
        });
    });
</script>
</body>

</html>